<?php
 
namespace app\admin\validate;
use think\Validate;
/**
*  产品验证器
*/
class Product extends Validate{
    // 验证规则
    protected $rule = [
        ['car_brand','require|number'],
        ['car_type','require|number'],
        ['car_year','require|number'],
        ['name','require','版本配置不能为空'],
        ['tservice','length:1,100'],
        ['youhui_type','number'],
        ['youhui_msg','length:1,200'],
        ['new_price','require|number','指导价不能为空'],
        ['top_price','require|number','首付不能为空'],
        ['mon_price','require|number','月供不能为空'],
        ['instalment','require|number','期数不能为空'],//期数
        ['year_service','require|length:1,20','分期购车不能为空'],
        ['year_allprice','require|number','全款购车不能为空'],
        ['cu_price','number','价格必须是整数'],
        ['car_xi','require|max:50','请完善配置参数|配置参数长度不能超过50个字符'],
        ['car_cwh','require|max:50','请完善配置参数|配置参数长度不能超过50个字符'],
        ['car_jiegou','require|max:50','请完善配置参数|配置参数长度不能超过50个字符'],
        ['car_fdj','require|max:50','请完善配置参数|配置参数长度不能超过50个字符'],
        ['car_bsx','require|max:50','请完善配置参数|配置参数长度不能超过50个字符'],
        ['car_qd','require|max:50','请完善配置参数|配置参数长度不能超过50个字符'],
        ['car_qy','require|max:50','请完善配置参数|配置参数长度不能超过50个字符'],
        ['car_yh','require|max:50','请完善配置参数|配置参数长度不能超过50个字符'],
        ['car_color','require|max:200','请完善配置参数|车辆配色长度不能超过200个字符'],
        ['isdisplay','require|number'],
        ['isold','require|number'],
        ['editorValue','require','车辆亮点不能为空'],
        ['imgs','require','请至少上传一张车辆展示图片'],
        
        
    ];  
    
}